package com.shop.dao.book;

import com.shop.pajo.Book;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface IBookDao {
    public List<Book> query(Connection connection, String queryName, String queryCode) throws SQLException;

    //添加一本书
    public int add(Connection connection, Book book) throws SQLException;

    //通过id查找一本书
    public Book getBookById(Connection connection, String id) throws SQLException;

    public int updateBook(Connection connection, Book book) throws SQLException;

    //依靠id删除一本书
    public int deleteBookById(Connection connection, String id) throws  SQLException;

    //通过分类查找书列表
    public List<Book> queryByClass(Connection connection,String bClass) throws SQLException;
}

